package com.dyp.demo.OpenFeignDemo.service;

import com.dyp.demo.OpenFeignDemo.config.LoadBalancedConfig;
import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name="WORKER-SERVER")
@LoadBalancerClient(name="WORKER-SERVER", configuration = LoadBalancedConfig.class)
public interface DemoWorkerService {
    @GetMapping(value = "/mvc/{name}")
    String sayName(@PathVariable(name = "name") String name);

}
